<template>
    <div>
        {{ num }}
    </div>
</template>

<script setup lang='ts'>
import { ref, reactive, getCurrentInstance } from 'vue'
const num = ref(0)
const setNum = (value: any) => {
    num.value = value
}
const instance = getCurrentInstance()
instance?.proxy?.$Bus.on('changeNum', setNum)
</script>

<style scoped></style>